package com.wang.designpattern.adapter.objectadapter;

public class Phone {

    /**
     * 充电
     * @param voltage5
     */
    public void charging(IVoltage5 voltage5) {
        if (voltage5.outPut5() == 5) {
            System.out.println("电压为5v，可以充电");
        } else {
            System.out.println("电压不为5v，不能充电");
        }
    }
}
